﻿
using RBAC.Domain;
using RBAC.Domain.Dto;
using Swork03_28.Domain.RBAC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Server.Interface
{
    public interface IRoleServer
    {
        Task<int> CreateRole(Roles role);

        Task<(int totalCount, int pageCount, List<Roles> list)> GetRoles(int pageIndex, int pageSize);

        Task<List<MenuItem>> GetMenuItem(int SectorId);

        Task<int> Del(int id);

        Task<Roles> GetRolesUpd(int id);

        Task<int> Update(Roles role);

        Task<int> AddRole(List<MenuItem> userId, int roleId, int SectorId);

        Task<List<UserDto>> GetUserInfos(int roleId);

        Task<int> DelRoleUser(int roleId, int userId);

        Task<List<MenuItem>> UpdUserRole(int RoleId);

        Task<List<MenuItem>> UpdUserRoleAsDoor(int dId);
    }
}
